<%--
    Document   : popuptemplate
    Created on : Jun 4, 2012, 2:47:19 PM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
    </head>
    <script type="text/javascript">
        
        var open_cur = 0;
        //        if (typeof jQuery == 'undefined') {
        //            window.location.href="accessdenied.jsp";
        //        }
        $j = jQuery.noConflict();
        $j(document).ready(function(){
            var count = 0;
            var template_mobi1='<h:inputText value="" styleClass="input_mobi"/>';
            var template_mobi2='<h:inputText value="demo" styleClass="input_mobi"/>';
            
           
            $j(".add").live("click",function(){
                count++;
                if(count<=2){
                    
                    if(count == 1){
                        $j(".mobi").append(template_mobi1) ;  
                        $j(".input_mobi").addClass("input_mobi"+count);
                    }
                    if(count ==2){
                        $j(".mobi").append(template_mobi2) ;  
                         $j(".input_mobi").addClass("input_mobi"+count);
                    }
               
                }
               
            });
        });
    </script>


    <style>
    </style>

    <a4j:form >
        <div class="mobi" id="mobi1">
            <h:inputText value="" styleClass="input_mobi"/>
            <label class="add">add</div>

    </div>

</a4j:form>

</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>